package com.pangyangyang.elasticsearch.plugin.river;

import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.river.RiversModule;

/**
 * Created by yangwang on 2015/1/14.
 */
public class MessageRiverPlugin extends AbstractPlugin {

    @Override
    public String name() {
        return "message-" + Build.getInstance().getVersion();
    }

    @Override
    public String description() {
        return Build.getInstance().getDescription();
    }

    //Every plugin adds some features to the system, and those features need to be registered so  that the system knows about them.
    public void onModule(RiversModule module) {
        module.registerRiver("message", MessageRiverModule.class);
    }
}
